<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Vue.set</title>
		<script src="../assets/js/vue.js"></script>
	</head>
	<body>
		<h3>引用构造器外部数据：Vue.set</h3>
		<div id="app">
			<p>{{count}}</p>
			<ul>
				
					<li v-for="item in arry">{{item}}</li>
				
			</ul>
		</div>
		<button onclick="add()">add</button>
		<script>
			function add(){
				//outData.count++;
				//app.count++;
				//Vue.set(outData,'count',5)
				//Vue.set(outData.arry,1,'ddd')
				Vue.set(app.arry,0,'freeddy')
			}
			var outData = {
				count:1,
				arry:[1,2,3,4,5,6]
			}
			var app = new Vue({
				el:"#app",
				data:outData
			})
		</script>
	</body>
</html>
